﻿cls;
#initialize SharePoint Snap-in
Add-PsSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue;

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint");

$pkgname = "com.crownpack.initiatives.wsp";
$path = "C:\prj\crownpack\com.crownpack.initiatives\bin\Debug\com.crownpack.initiatives.wsp";

Uninstall-SPSolution -Local -Identity $pkgname -Verbose -ErrorAction SilentlyContinue -Confirm:$false;
Remove-SPSolution -Identity $pkgname -Verbose -ErrorAction SilentlyContinue -Confirm:$false;
Add-SPSolution -LiteralPath $path;
Install-SPSolution -Identity $pkgname -GACDeployment -Verbose -Force;